unit TAnimalObject_API;

interface

uses Classes, EngineType, ObjBase, M2Share, Grobal2;

function TAnimalObject_m_nNotProcessCount(SelfObject: TAnimalObject): pInteger; stdcall;
function TAnimalObject_m_nTargetX(SelfObject: TAnimalObject): pInteger; stdcall;
function TAnimalObject_m_nTargetY(SelfObject: TAnimalObject): pInteger; stdcall;
function TAnimalObject_m_nTargetX2(SelfObject: TAnimalObject): pInteger; stdcall;
function TAnimalObject_m_nTargetY2(SelfObject: TAnimalObject): pInteger; stdcall;
function TAnimalObject_m_boRunAwayMode(SelfObject: TAnimalObject): pBoolean; stdcall;
function TAnimalObject_m_dwRunAwayStart(SelfObject: TAnimalObject): pLongWord; stdcall;
function TAnimalObject_m_dwRunAwayTime(SelfObject: TAnimalObject): pLongWord; stdcall;

//functions

procedure TAnimalObject_SearchTarget(SelfObject: TAnimalObject); stdcall;
procedure TAnimalObject_SearchTargetA(SelfObject: TAnimalObject); stdcall;
procedure TAnimalObject_SearchTargetHero(SelfObject: TAnimalObject); stdcall;
procedure TAnimalObject_HeroSearchTarget(SelfObject: TAnimalObject); stdcall;
function TAnimalObject_Operate(SelfObject: TAnimalObject; ProcessMsg: pTProcessMessage): Boolean; stdcall;
procedure TAnimalObject_Run(SelfObject: TAnimalObject); stdcall;
procedure TAnimalObject_DelTargetCreat(SelfObject: TAnimalObject); stdcall;
procedure TAnimalObject_SetTargetXY(SelfObject: TAnimalObject; nX, nY: Integer); stdcall;
function TAnimalObject_RuntoTargetXY(SelfObject: TAnimalObject; btDir: Byte; boFlag: Boolean): Boolean; stdcall;
procedure TAnimalObject_GotoTargetXY(SelfObject: TAnimalObject); stdcall;
procedure TAnimalObject_Wondering(SelfObject: TAnimalObject); stdcall;
procedure TAnimalObject_Attack(SelfObject: TAnimalObject; TargeTBaseObject: TBaseObject; nDir: Integer); stdcall;
procedure TAnimalObject_Struck(SelfObject: TAnimalObject; hiter: TBaseObject); stdcall;
procedure TAnimalObject_HitMagAttackTarget(SelfObject: TAnimalObject; TargeTBaseObject: TBaseObject; nHitPower: Integer; nMagPower: Integer; boFlag: Boolean; nRange: Integer = 0); stdcall;
function TAnimalObject_SetUseNormAttack(SelfObject: TAnimalObject): Boolean; stdcall;
function TAnimalObject_MonPickItem(SelfObject: TAnimalObject): Boolean; stdcall;




implementation

function TAnimalObject_m_nNotProcessCount(SelfObject: TAnimalObject): pInteger; stdcall;
begin
  try
    Result := @SelfObject.m_nNotProcessCount;
  except
    MainOutMessageAPI('[Exception] TAnimalObjectApi.TAnimalObject_m_nNotProcessCount');
  end;
end;
function TAnimalObject_m_nTargetX(SelfObject: TAnimalObject): pInteger; stdcall;
begin
  try
    Result := @SelfObject.m_nTargetX;
  except
    MainOutMessageAPI('[Exception] TAnimalObjectApi.TAnimalObject_m_nTargetX');
  end;
end;
function TAnimalObject_m_nTargetY(SelfObject: TAnimalObject): pInteger; stdcall;
begin
  try
    Result := @SelfObject.m_nTargetY;
  except
    MainOutMessageAPI('[Exception] TAnimalObjectApi.TAnimalObject_m_nTargetY');
  end;
end;
function TAnimalObject_m_nTargetX2(SelfObject: TAnimalObject): pInteger; stdcall;
begin
  try
    Result := @SelfObject.m_nTargetX2;
  except
    MainOutMessageAPI('[Exception] TAnimalObjectApi.TAnimalObject_m_nTargetX2');
  end;
end;
function TAnimalObject_m_nTargetY2(SelfObject: TAnimalObject): pInteger; stdcall;
begin
  try
    Result := @SelfObject.m_nTargetY2;
  except
    MainOutMessageAPI('[Exception] TAnimalObjectApi.TAnimalObject_m_nTargetY2');
  end;
end;
function TAnimalObject_m_boRunAwayMode(SelfObject: TAnimalObject): pBoolean; stdcall;
begin
  try
    Result := @SelfObject.m_boRunAwayMode;
  except
    MainOutMessageAPI('[Exception] TAnimalObjectApi.TAnimalObject_m_boRunAwayMode');
  end;
end;
function TAnimalObject_m_dwRunAwayStart(SelfObject: TAnimalObject): pLongWord; stdcall;
begin
  try
    Result := @SelfObject.m_dwRunAwayStart;
  except
    MainOutMessageAPI('[Exception] TAnimalObjectApi.TAnimalObject_m_dwRunAwayStart');
  end;
end;
function TAnimalObject_m_dwRunAwayTime(SelfObject: TAnimalObject): pLongWord; stdcall;
begin
  try
    Result := @SelfObject.m_dwRunAwayTime;
  except
    MainOutMessageAPI('[Exception] TAnimalObjectApi.TAnimalObject_m_dwRunAwayTime');
  end;
end;

//functions

procedure TAnimalObject_SearchTarget(SelfObject: TAnimalObject); stdcall;
begin
  try
    SelfObject.SearchTarget;
  except
    MainOutMessageAPI('[Exception] TAnimalObjectApi.TAnimalObject_SearchTarget');
  end;
end;
procedure TAnimalObject_SearchTargetA(SelfObject: TAnimalObject); stdcall;
begin
  try
    SelfObject.SearchTargetA;
  except
    MainOutMessageAPI('[Exception] TAnimalObjectApi.TAnimalObject_SearchTargetA');
  end;
end;
procedure TAnimalObject_SearchTargetHero(SelfObject: TAnimalObject); stdcall;
begin
  try
    SelfObject.SearchTargetHero;
  except
    MainOutMessageAPI('[Exception] TAnimalObjectApi.TAnimalObject_SearchTargetHero');
  end;
end;
procedure TAnimalObject_HeroSearchTarget(SelfObject: TAnimalObject); stdcall;
begin
  try
    SelfObject.HeroSearchTarget;
  except
    MainOutMessageAPI('[Exception] TAnimalObjectApi.TAnimalObject_HeroSearchTarget');
  end;
end;
function TAnimalObject_Operate(SelfObject: TAnimalObject; ProcessMsg: pTProcessMessage): Boolean; stdcall;
begin
  try
    Result := SelfObject.Operate(ProcessMsg);
  except
    MainOutMessageAPI('[Exception] TAnimalObjectApi.TAnimalObject_Operate');
  end;
end;
procedure TAnimalObject_Run(SelfObject: TAnimalObject); stdcall;
begin
  try
    SelfObject.Run;
  except
    MainOutMessageAPI('[Exception] TAnimalObjectApi.TAnimalObject_Run');
  end;
end;
procedure TAnimalObject_DelTargetCreat(SelfObject: TAnimalObject); stdcall;
begin
  try
    SelfObject.DelTargetCreat;
  except
    MainOutMessageAPI('[Exception] TAnimalObjectApi.TAnimalObject_DelTargetCreat');
  end;
end;
procedure TAnimalObject_SetTargetXY(SelfObject: TAnimalObject; nX, nY: Integer); stdcall;
begin
  try
    SelfObject.SetTargetXY(nX, nY);
  except
    MainOutMessageAPI('[Exception] TAnimalObjectApi.TAnimalObject_SetTargetXY');
  end;
end;
function TAnimalObject_RuntoTargetXY(SelfObject: TAnimalObject; btDir: Byte; boFlag: Boolean): Boolean; stdcall;
begin
  try
    Result := SelfObject.RuntoTargetXY(btDir, boFlag);
  except
    MainOutMessageAPI('[Exception] TAnimalObjectApi.TAnimalObject_RuntoTargetXY');
  end;
end;
procedure TAnimalObject_GotoTargetXY(SelfObject: TAnimalObject); stdcall;
begin
  try
    SelfObject.GotoTargetXY;
  except
    MainOutMessageAPI('[Exception] TAnimalObjectApi.TAnimalObject_GotoTargetXY');
  end;
end;
procedure TAnimalObject_Wondering(SelfObject: TAnimalObject); stdcall;
begin
  try
    SelfObject.Wondering;
  except
    MainOutMessageAPI('[Exception] TAnimalObjectApi.TAnimalObject_Wondering');
  end;
end;
procedure TAnimalObject_Attack(SelfObject: TAnimalObject; TargeTBaseObject: TBaseObject; nDir: Integer); stdcall;
begin
  try
    SelfObject.Attack(TargeTBaseObject, nDir);
  except
    MainOutMessageAPI('[Exception] TAnimalObjectApi.TAnimalObject_Attack');
  end;
end;
procedure TAnimalObject_Struck(SelfObject: TAnimalObject; hiter: TBaseObject); stdcall;
begin
  try
    SelfObject.Struck(hiter);
  except
    MainOutMessageAPI('[Exception] TAnimalObjectApi.TAnimalObject_Struck');
  end;
end;
procedure TAnimalObject_HitMagAttackTarget(SelfObject: TAnimalObject; TargeTBaseObject: TBaseObject; nHitPower: Integer; nMagPower: Integer; boFlag: Boolean; nRange: Integer = 0); stdcall;
begin
  try
    SelfObject.HitMagAttackTarget(TargeTBaseObject, nHitPower, nMagPower, boFlag, nRange);
  except
    MainOutMessageAPI('[Exception] TAnimalObjectApi.TAnimalObject_HitMagAttackTarget');
  end;
end;
function TAnimalObject_SetUseNormAttack(SelfObject: TAnimalObject): Boolean; stdcall;
begin
  try
    Result := SelfObject.SetUseNormAttack;
  except
    MainOutMessageAPI('[Exception] TAnimalObjectApi.TAnimalObject_SetUseNormAttack');
  end;
end;
function TAnimalObject_MonPickItem(SelfObject: TAnimalObject): Boolean; stdcall;
begin
  try
    Result := SelfObject.MonPickItem;
  except
    MainOutMessageAPI('[Exception] TAnimalObjectApi.TAnimalObject_MonPickItem');
  end;
end;



end.
